﻿using Autofac;
using GC_FFW.ForecastWriterClient.Abstractions.Factories;
using GC_FFW.ForecastWriterClient.Abstractions.Interfaces.Managers;
using GC_FFW.ForecastWriterClient.Factories;
using GC_FFW.ForecastWriterClient.Managers;

namespace GC_FFW.ForecastWriterClient.Modules.Autofac
{
	public class ForecastWriterClientModule : Module
	{
		#region Override Methods

		protected override void Load(ContainerBuilder builder)
		{
			base.Load(builder);

			//Dependencies: IForecastDataBuilder, IForecastStructureBuilder, IForecastBuilder, ISoccerfameDataHelperFactory, IBrowserDialog, IImportService
			builder.RegisterType<WindowViewModelFactories>().As<WindowViewModelBaseFactories>().SingleInstance();

			builder.RegisterType<WindowFactory>().As<WindowBaseFactory>().SingleInstance();

			//Dependencies: WindowBaseFactory, WindowViewModelBaseFactories
			builder.RegisterType<WindowAdapterFactory>().As<WindowAdapterBaseFactory>().SingleInstance();

			//Dependencies: WindowAdapterBaseFactory
			builder.RegisterType<WindowManager>().As<IWindowManager>().SingleInstance();
		}

		#endregion
	}
}
